package cn.bookcycle.paypage.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.bookcycle.paypage.constant.BusinessData;
import cn.bookcycle.paypage.constant.Symbol;

/**
 * 结果视图
 *
 * @author liufenglin
 * @date 2018年3月16日
 */
@Controller
public class ResultController {
	private static final Logger logger = LoggerFactory.getLogger(ResultController.class);
	
	@RequestMapping(value = "success")
	public String success(String userId, Model model) {
		logger.info("返回支付成功页面收到的userId:{}", userId);
		model.addAttribute(Symbol.USER_ID, userId);
		return "success";
	}
	
	@RequestMapping(value = "failure")
	public String failure() {
		return "failure";
	}

}
